package com.ktwlsoft.archivemanage.domain.business.repositoryService.guiBusiness;

import java.util.List;

import com.ktwlsoft.archivemanage.domain.dao.entity.guiBusiness.GuiGuidanceItem;
import com.ktwlsoft.archivemanage.payload.guiBusiness.MendListItemResult;
import org.springframework.stereotype.Service;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.ktwlsoft.archivemanage.domain.dao.repository.guiBusiness.IGuiGuidanceItemMendListMapper;
import com.ktwlsoft.archivemanage.domain.dao.entity.guiBusiness.GuiGuidanceItemMendList;

/**
 * gui_guidance_item_mend_list--指导条目整改业务层接口实现类
 *
 * @author zhuhe on 2020-04-28 17:58:06
 * @version 1.0
 */
@Service
public class GuiGuidanceItemMendListRepositoryService {
	
	private final IGuiGuidanceItemMendListMapper guiGuidanceItemMendListMapper;

	public GuiGuidanceItemMendListRepositoryService(IGuiGuidanceItemMendListMapper guiGuidanceItemMendListMapper) {
		this.guiGuidanceItemMendListMapper = guiGuidanceItemMendListMapper;
	}

	/**
 	 * 查询分页 on 2020-04-28 17:58:06
 	 * @param pn 第几页
     * @param pageSize 每页多少条
 	 * @param guiGuidanceItemMendList guiGuidanceItemMendList
 	 * @return PageInfo<GuiGuidanceItemMendList>
 	 */
	public PageInfo<GuiGuidanceItemMendList> findPage(int pn,int pageSize,GuiGuidanceItemMendList guiGuidanceItemMendList) {
		PageHelper.startPage(pn,pageSize);
		PageInfo<GuiGuidanceItemMendList> pageInfo = new PageInfo<GuiGuidanceItemMendList>(guiGuidanceItemMendListMapper.findList(guiGuidanceItemMendList));
		return pageInfo;
	}

    /**
	 * 查询集合 on 2020-04-28 17:58:06
	 * @param guiGuidanceItemMendList guiGuidanceItemMendList
	 * @return List<GuiGuidanceItemMendList>
	 */
	public List<GuiGuidanceItemMendList> findList(GuiGuidanceItemMendList guiGuidanceItemMendList) {
		return guiGuidanceItemMendListMapper.findList(guiGuidanceItemMendList);
	}

    /**
	 * 根据ID查询信息 on 2020-04-28 17:58:06
	 * @param id	主键
	 * @return GuiGuidanceItemMendList
	 */
	public GuiGuidanceItemMendList getById(Long id){
		return guiGuidanceItemMendListMapper.getById(id);
	}

	/**
	  * 详情 on 2020/4/29 17:35
	  *
	  * @param guiGuidanceItem guiGuidanceItem
	  * @return List<MendListItemResult>
	  */
	public List<MendListItemResult> getDetails(GuiGuidanceItem guiGuidanceItem){
		return guiGuidanceItemMendListMapper.getDetails(guiGuidanceItem);
	}

	/**
	 * 根据整改ID查询信息 on 2020-04-28 17:58:06
	 * @param mendListId	整改ID
	 * @return List<GuiGuidanceItemMendList>
	 */
	public List<GuiGuidanceItemMendList> getByMendListId(Long mendListId){
		return guiGuidanceItemMendListMapper.getByMendListId(mendListId);
	}

   /**
	 * 新增 on 2020-04-28 17:58:06
	 * @param guiGuidanceItemMendList guiGuidanceItemMendList
	 * @return int
	 */
	public int insert(GuiGuidanceItemMendList guiGuidanceItemMendList){
		return guiGuidanceItemMendListMapper.insert(guiGuidanceItemMendList);
	}

	/**
	 * 批量插入 2020-04-28 17:58:06
	 *
	 * @param list list
	 * @return int
	 */
	public int manyInsert(List<GuiGuidanceItemMendList> list){
	    return guiGuidanceItemMendListMapper.manyInsert(list);
	}

   /**
	 * 修改 on 2020-04-28 17:58:06
	 * @param guiGuidanceItemMendList guiGuidanceItemMendList
	 * @return int
	 */
	public int update(GuiGuidanceItemMendList guiGuidanceItemMendList){
		return guiGuidanceItemMendListMapper.update(guiGuidanceItemMendList);
	}

   /**
	 * 根据id集合批量删除信息 on 2020-04-28 17:58:06
	 * @param guiGuidanceItemMendListArr	主键编号集合
	 * @return int
	 */
	public int deleteByIds(List<Long> guiGuidanceItemMendListArr){
		return guiGuidanceItemMendListMapper.deleteByIds(guiGuidanceItemMendListArr);
	}

   /**
	 * 根据id删除信息 on 2020-04-28 17:58:06
	 * @param id id
	 * @return int
	 */
	public int deleteById(Long id){
		return guiGuidanceItemMendListMapper.deleteById(id);
	}

	/**
	 * 根据整改id删除信息 on 2020-04-28 17:58:06
	 * @param mendListId mendListId
	 * @return int
	 */
	public int deleteByMendListId(Long mendListId){
		return guiGuidanceItemMendListMapper.deleteByMendListId(mendListId);
	}
}
